package cn.edu.ujn.booksshop.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.edu.ujn.booksshop.dao.OrderDetail;
import cn.edu.ujn.booksshop.dao.OrderDetailMapper;
@Service
@Transactional
public class OrderDetailServiceImpl implements OrderDetailService {
	@Autowired
	private OrderDetailMapper orderDetailDao;
	
	@Override
	public int deleteByPrimaryKey(Integer orderdetailid) {
		orderDetailDao.deleteByPrimaryKey(orderdetailid);
		return 0;
	}

	@Override
	public int insert(OrderDetail row) {
		// TODO Auto-generated method stub
		orderDetailDao.insert(row);
		return 0;
	}

	@Override
	public OrderDetail selectByPrimaryKey(Integer orderdetailid) {
		// TODO Auto-generated method stub
		OrderDetail key = orderDetailDao.selectByPrimaryKey(orderdetailid);
		return key;
	}

	@Override
	public int updateByPrimaryKey(OrderDetail row) {
		// TODO Auto-generated method stub
		orderDetailDao.updateByPrimaryKey(row);
		return 0;
	}

	@Override
	public List<OrderDetail> findAll() {
		// TODO Auto-generated method stub
		List<OrderDetail> list = orderDetailDao.findAll();
		return list;
	}

}
